package robocode.DadosRobos;

public class RoboScaneado {
	private final String _nomeRobo;
	private final double _x, _y;
	private final double _heading;
	private final boolean _executando;

	public double getHeading() { return _heading; }
	public String getNomeRobo() { return _nomeRobo; }
	public double getX() { return _x; }
	public double getY() { return _y; }
	public boolean getExecutando() { return _executando; }
	
	public RoboScaneado(String nomeRobo, double heading, double x, double y, boolean executando){
		_nomeRobo = nomeRobo;
		_heading = heading;
		_x = x; _y = y;
		_executando = executando;
	}
	
	@Override
	public String toString() {
		return getNomeRobo() + "," + getX() + "," + getY() + "," + getHeading() + "," + getExecutando();
	}
	
	@Override
	public boolean equals(Object obj) {
		if (obj==null) return false;
		RoboScaneado r = (RoboScaneado) obj;
		return r.getNomeRobo().equals(this.getNomeRobo());
	}
	
}